home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / portal2.zip / PORTAL.CMD < prev    next >
OS/2 REXX Batch file  |  1988-03-13  |  3KB  |  87 lines

  1. ;  ProComm+ logon script for Portal accessed via Telenet or PC Pursuit
  2. ;  Released to the public domain by K. Patz
  3. ;
  4. ;  S1 = "c portal,id,password^M"; id,password is PC Pursuit ID and password
  5. ;  if not using PC Pursuit, S1 = "c portal^M"
  6. ;
  7. ;  S2 = your Portal user name followed by ^M
  8. ;  S3 = your Portal password followed by ^M
  9.  
  10. ASSIGN S1 "c portal,pcpid,pcppassword^M"   ;*** Include PC Pursuit ID/pswd
  11. ASSIGN S2 "Your User Name^M"               ;*** Portal user name
  12. ASSIGN S3 "YourPortalPassword^M"           ;*** Portal password
  13.  
  14. SET DATABITS 8              ; Select 8 bits no parity
  15. SET PARITY NONE             ; so Telenet messages come in clear
  16. IF LINKED
  17.     GOTO SKIPDIAL
  18. ENDIF
  19. REDIAL:
  20. HANGUP
  21. DIAL "5"                    ;*** Change to Telenet/Portal entry in dialing dir
  22. SKIPDIAL:
  23. PAUSE 1
  24. TRANSMIT "^M"               ;Send CR D CR Telenet 8 bits no parity
  25. PAUSE 1
  26. TRANSMIT "D^M"
  27. WAITFOR "TERMINAL="
  28. PAUSE 1
  29. TRANSMIT "^M"               ;Response to TERMINAL= prompt
  30. WAITFOR "@"
  31. LOOP:
  32. PAUSE 1
  33. TRANSMIT S1                 ;Send Telenet connect command and PCP info
  34. WAITFOR "moment, please" 20 ;Wait for initial Portal message
  35. IF NOT WAITFOR              ;Retry if not received
  36.     GOTO RETRY
  37. ENDIF
  38. WAITFOR "INFO, or HELP:" 120   ;Wait for Portal user ID prompt
  39. IF NOT WAITFOR
  40.     GOTO RETRY              ;If it doesn't appear, error
  41. ENDIF
  42. PAUSE 1
  43. SET PARITY NONE             ;Select 8 bits no parity for Portal
  44. SET DATABITS 8          
  45. TRANSMIT S2                 ;Send user name
  46. WAITFOR "password: "        ;Wait for password prompt
  47. PAUSE 1
  48. TRANSMIT S3                 ;Send password
  49. ;
  50. ; ** If you don't want to have this script file change your default setting
  51. ;    to pseudonym, delete this code up to the "END OF PSEUDONYM CODE" comment.
  52. ;
  53. WAITFOR "URN> to continue" 120 ;Wait for prompt at end of opening msg
  54. IF NOT WAITFOR
  55.     GOTO RETRY
  56. ENDIF
  57. PAUSE 1
  58. TRANSMIT "^M"               ;Respond by sending CR
  59. WAITFOR "Command: " 120     ;Wait for main menu command line
  60. IF NOT WAITFOR
  61.     GOTO RETRY
  62. ENDIF
  63. PAUSE 1
  64. TRANSMIT "7;3;;1;TOP^M"     ;Go to user settings, select pseudonym, goto TOP
  65. ;
  66. ; **  END OF PSEUDONYM CODE
  67. ;
  68. PAUSE 5
  69. TRANSMIT "^M"
  70. TERMINAL                    ; We're all done!!!!!
  71.  
  72. RETRY:                   ;Retry 10 times if failure to reach Portal
  73.     WAITFOR "@" 15        ;Wait for Portal to return to Telenet
  74.     IF NOT WAITFOR
  75.         TRANSMIT "^M"     ;Send carriage return to reestablish @ prompt
  76.         WAITFOR "@" 5
  77.             IF NOT WAITFOR
  78.             TRANSMIT "@^M"    ;Return to Telenet if Portal doesn't disconnect
  79.             WAITFOR "@" 10
  80.             IF NOT WAITFOR
  81.                 GOTO REDIAL
  82.             ENDIF
  83.             TRANSMIT "D^M"    ;Disconnect from Portal
  84.         ENDIF
  85.     ENDIF
  86.     GOTO LOOP
  87.